package com.zhan.ielts.dao.impl.article;

import com.zhan.frame.core.dao.impl.BaseDaoImpl;
import com.zhan.ielts.dao.article.CategoryDao;
import com.zhan.ielts.domain.article.Category;
import com.zhan.ielts.domain.article.query.CategoryQuery;
import com.zhan.ielts.domain.article.vo.CategoryChildVo;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by Administrator on 2016/8/19.
 */
@Repository
public class CategoryDaoImpl extends BaseDaoImpl<Category> implements CategoryDao {
    @Override
    public void insertBatchCategories(List<CategoryQuery> categories) {
        sqlSessionTemplate.insert(getSqlName("insertBatch"), categories);
    }

    @Override
    public List<Category> getCategories() {
        return null;
    }

    @Override
    public List<CategoryChildVo> getChildCategories(Category category) {
        return sqlSessionTemplate.selectList(getSqlName("selectChildList"), category);
    }
}
